import java.awt.event.MouseEvent;


public class TwitterButtonBackgroundController extends TwitterButtonController {

	public BackgroundPanelView backgroundPanel;

	public TwitterButtonBackgroundController(String defaultImagePath,
			String rolloverImagePath, BackgroundPanelView backgroundPanel) {
		super(defaultImagePath, rolloverImagePath);
		this.backgroundPanel = backgroundPanel;
	}
	
	@Override
	public void mouseClicked(MouseEvent e) {
		backgroundPanel.counter += 1;
		if (backgroundPanel.counter == backgroundPanel.backgroundImage.size()) {
			backgroundPanel.counter = 0;	
		}
		backgroundPanel.setImage(backgroundPanel.backgroundImage.get(backgroundPanel.counter));
		backgroundPanel.repaint();
	}

}
